﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Templates_NewsSection_Default" %>
<%@ Register TagPrefix="uc" TagName="ExploreModule" Src="~/Templates/Generic/ExploreModule.ascx" %>
<%@ Register TagPrefix="uc" TagName="FeedModule" Src="~/Templates/Generic/FeedModule.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script type="text/javascript">
        var checkAll = function(checked) {
            var ids = new Array();
            ids[0] = "<%=cblServices.ClientID%>";
            ids[1] = "<%=cblPeople.ClientID%>";
            for (var i = 0; i < ids.length; i++) {
                var n = 1;
                var elem = document.getElementById(ids[i] + "_item" + n);
                while (elem) {
                    elem.checked = checked;
                    n++;
                    elem = document.getElementById(ids[i] + "_item" + n);
                }
            }
            return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="fullWidth">
    
        <h1>News &amp; Articles</h1>
        <ajax:Accordion ID="accordianFilter" CssClass="expandableForm" ContentCssClass="content" HeaderCssClass="header normal" HeaderSelectedCssClass="header selected" RequireOpenedPane="false" SelectedIndex="-1" runat="server">
            <Panes>
                <ajax:AccordionPane ID="accordianFilterPane" runat="server">
                    <Header><h4>Filter <acms:PostDisplayName runat="server" /></h4></Header>
                    <Content>
                        <ul class="form">
                            <li>
                                <span class="formLabel">Services:</span>
                                <span class="formInput">
                                    <acms:CheckBoxList ID="cblServices" CssClass="checkboxList" DataTextField="Name" DataValueField="Id" runat="server" />
                                </span>
                            </li>
                            <%--<li>
                                <span class="formLabel">Sectors:</span>
                                <span class="formInput">
                                    <acms:CheckBoxList ID="cblSectors" CssClass="checkboxList" DataTextField="Name" DataValueField="Id" runat="server" />
                                </span>
                            </li>--%>
                            <li>
                                <span class="formLabel">People:</span>
                                <span class="formInput">
                                    <acms:CheckBoxList ID="cblPeople" CssClass="checkboxList" DataTextField="Name" DataValueField="Id" runat="server" />
                                </span>
                            </li>
                            <li>
                                <span class="formInput">
                                    <asp:Button ID="btnApplyFilter" CssClass="button" Text="Apply Filter" OnClick="btnApplyFilter_Click" runat="server" />
                                    <asp:Button ID="btnCheckAll" CssClass="button" Text="Select All" OnClientClick="return checkAll(true);" runat="server" />
                                    <asp:Button ID="btnUnCheckAll" CssClass="button" Text="Remove All" OnClientClick="return checkAll(false);" runat="server" />
                                </span>
                            </li>
                        </ul>
                    </Content>
                </ajax:AccordionPane>
            </Panes>
        </ajax:Accordion>
        <uc:FeedModule ID="ucFeedModule" AllowPaging="true" PageSize="10" runat="server" />
        <uc:ExploreModule ID="ucExploreModule" MainItemsToDisplay="3" SubItemsPerRow="4" Title='<%#AcmsContext.CurrentPost != null ? AcmsContext.CurrentPost.DisplayName : "Display Name Here" %>' runat="server" />
    </div>
</asp:Content>

